package com.mytijian.task;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ImportResource;

@SpringBootApplication(exclude = {RedisAutoConfiguration.class, DataSourceAutoConfiguration.class})
@ImportResource(locations = {"classpath*:spring-dubbo-consumer.xml", "classpath*:spring-dubbo-provider.xml"})
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

//    	@Autowired
//	public void redist(RedisTemplate redisTemplate) {
//		//Set<String> strings = redisTemplate.keys("foo");
//		redisTemplate.execute(new RedisCallback() {
//				@Nullable
//				@Override
//				public Object doInRedis(RedisConnection redisConnection) throws DataAccessException {
//					long first = System.currentTimeMillis();
//					StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
////					for (int i = 0; i< 60000 ;i ++) {
////						redisConnection.set(stringRedisSerializer.serialize( "foo"),stringRedisSerializer.serialize(i+""));
////					}
//                    byte[] bytes = redisConnection.get(stringRedisSerializer.serialize("a:b:c"));
//                    int i = 0;
//					return 2;
//
//				}
//			});
//		//Boolean b = redisTemplate.expire( "ip1", 100, TimeUnit.SECONDS);
//
//		int i = 0;
//	}

}
